<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>职业</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/button.css" rel="stylesheet" type="text/css" />
    <link href="css/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/job.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <ul id="list-dom" class="container">
    </ul>
    <script id="list" type="text/html">
        {{each list}}
        <li><a data-id="{{ $value.id }}" href="javascript:;">{{ $value.name }}</a></li>
        {{/each}}
    </script>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            bee.request({
                url: '/Index/Index/getoccupation',
                data: null,
                success: function(data) {
                    bee.template('list', data, true);
                    var job = bee.cache('job');
                    $('a:contains(' + job + ')').addClass('active');

                    $('body').on('click', '.container a', function() {
                        $('.container a').removeClass('active');
                        $(this).addClass('active');
                        bee.cache('job', $('.container a.active').text());
                        bee.cache('job_id', $('.container a.active').attr('data-id'));
                        bee.back();
                    });
                }
            });
        });
    </script>
</body>

</html>
